package com.fmy.jurisdiction;

import com.fmy.jurisdiction.core.inits.InitCommon;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.EnableAsync;

@SpringBootApplication
@EnableAsync
@EnableCaching
public class JurisdictionApplication {

    public static void main(String[] args) {
        init(SpringApplication.run(JurisdictionApplication.class, args));
    }

    private static void init(ApplicationContext context) {
        InitCommon initCommon = context.getBean(InitCommon.class);
        initCommon.init();
    }
}
